package com.hualude.roadsign.repository;

import com.hualude.roadsign.dto.*;
import com.hualude.roadsign.model.RoadLineEntity;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by ding on 2017/9/22.
 */
public interface RoadLineFaultCountRepository extends CrudRepository<RoadLineEntity, Long> {

    /**
     * @Description: 故障上报处理DT
     * @Author: jiang-weirong
     * @Date: 2017/9/20 14:40
     */
    public Integer getFaultCount4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds) throws Exception;

    public List<LineFaultDto> getFault4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds) throws Exception;

    /**
     * @Description: 设备的故障处理DT
     * @Author: jiang-weirong
     * @Date: 2017/9/20 15:00
     */
    public Integer getDeviceCount4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds, Integer userId) throws Exception;

    public List<LineFaultDto> getDevice4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds, Integer userId) throws Exception;

    /**
     * @Description: 位置统计datatables4DT count
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public Integer getRoadLineCount4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds) throws Exception;

    /**
     * @Description: 位置统计datatables4DT
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<RoadLineDto> getRoadLine4DT(DTRequestDto dtRequestDto, Integer actor, String orgIds) throws Exception;


    /**
     * @Description: 得到表中的全部省份
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getProvinceName(String orgIds) throws Exception;

    /**
     * @Description: 按照省份得到城市
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getCityName(String orgIds, String provinceName) throws Exception;

    /**
     * @Description: 获取表中的所有相关的区域名
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getAllAreaName(String orgIds, String provinceName, String cityName) throws Exception;

    /**
     * @Description: 获取表中的相关的道路名--联动道路名选择框
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getRoadNames(String provinceName, String cityName, String areaName, String orgId, Integer actor) throws Exception;


    /**
     * @Description: 获取起始路段
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getStartRoadName(String orgIds, String provinceName, String cityName, String areaName,
                                         String endRoadName, String roadName) throws Exception;

    /**
     * @Description: 根据起始路段获取终止路段
     * @Author: pan-jianan
     * @Date: 2017/9/20 14:00
     */
    public List<String> getEndRoadName(String orgIds, String startRoad, String provinceName, String cityName, String areaName, String roadName) throws Exception;

    /**
     * @Description: 得到某年按标志分类各个标志的数量
     * @Author: jiang-weirong
     * @Date: 2017/9/20 19:07
     */
    public List<Integer> getRoadLineTypeCounts(String orgIds, String time, String province, String city, String area, String road) throws Exception;

}
